New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tybys/cross-zip

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tybys/cross-zip

Cross-platform .zip file creation

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
502
increased by15.14%
Maintainers
1
Weekly downloads
 
Created
Source

cross-zip

Build status

Fork from https://github.com/feross/cross-zip

Cross-platform .zip file creation

Install

npm install @tybys/cross-zip

Usage

JavaScript

const path = require('path')
const crossZip = require('@tybys/cross-zip')

const input = path.join(__dirname, 'myFolder') // folder to zip
const output = path.join(__dirname, 'myFile.zip') // name of output zip file

crossZip.zipSync(input, output)

TypeScript

import * as path from 'path'
import * as crossZip from '@tybys/cross-zip'

const input = path.join(__dirname, 'myFolder') // folder to zip
const output = path.join(__dirname, 'myFile.zip') // name of output zip file

crossZip.zipSync(input, output)

API

crossZip.zip(input, output [, includeBaseDirectory])

Zip the folder or file at input and save it to a .zip file at output.

includeBaseDirectory: true to include the directory name from input at the root of the archive; false to include only the contents of the directory.

Return Promise<number> (size of archive).

crossZip.zipSync(input, output [, includeBaseDirectory])

Sync version of crossZip.zip.

crossZip.unzip(input, output)

Unzip the .zip file at input into the folder at output. Return Promise<void>.

crossZip.unzipSync(input, output)

Sync version of crossZip.unzip.

Windows users

This package requires .NET Framework 4.5 or later and Powershell 3. These come pre-installed on Windows 8 or later.

On Windows 7 or earlier, you will need to install these manually in order for cross-zip to function correctly.

Reference

License

MIT.

Keywords

FAQs

Package last updated on 02 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc